<div class="home_search">
    <form method="get" onsubmit="var query = $(this).find('input[type = text]').val(); var url = '/search/' + query; document.location = encodeURI(url); return false;">
        <label for="id_search">Поиск</label> &nbsp;
        <input name="query" id="id_search" type="text" value="<?=$query ?>">
        <button type="submit" class="button_gray">Найти</button>
    </form>
    <div class="clear"></div>
</div>

<h1 class="like_h2">Поиск - <?=$query ?></h1>

<?php foreach ($suppliers as $supplier): ?>
<?=Helper_Index::supplier_single($supplier) ?>
<?php foreach($result as $good) : ?>
<?php if ($good->supplier_id == $supplier->id) : ?>
<div style="margin-left: 70px;">
     <?=Helper_Index::good_single($good, $suppliers) ?>
</div>
<?php endif; ?>
<?php endforeach; ?>
<?php endforeach; ?>

<?php
$url = '/search/' . $query ;
echo Helper_Index::pagination($pagination['page'], $pagination['per_page'], $count, $url, $url); ?>